/*
 * $Id: JDateTimeConverter.java 30 2006-06-08 13:26:40Z wjx $
 */
package	com.someok.utils.datetime.converters;

import com.someok.utils.datetime.DateTimeStamp;
import com.someok.utils.datetime.JDateTime;

/**
 *
 *
 * <p><a href="JDateTimeConverter.java.html"><i>View Source</i></a></p>
 *
 * @author wjx
 * @version $Revision: 30 $ $Date: 2006-06-08 21:26:40 +0800 (星期四, 08 六月 2006) $
 */
public class JDateTimeConverter implements com.someok.utils.datetime.JdtConverter {


	public void load(JDateTime gt, Object o) {
		if (o instanceof JDateTime) {
			DateTimeStamp t = ((JDateTime) o).getDateTimeStamp();
			gt.setDateTimeStamp(t);
		}
	}

	public Object get(JDateTime gt) {
		return new JDateTime(gt);
	}

	public void store(JDateTime gt, Object o) {
		if (o instanceof JDateTime) {
			JDateTime g = (JDateTime) o;
			DateTimeStamp t = gt.getDateTimeStamp();
			g.setDateTimeStamp(t);
		}
	}


}
